package com.sunyve.cliplist.utils;

import com.sunyve.cliplist.R;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

public class NotificationUtils {

	public void buildNotification(Context context, Class clazz, String tickerText, long when, String contentTitle, String contentText) {

		NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
		Notification notification = new Notification(R.drawable.ic_launcher, tickerText, when);

		Intent intent = new Intent(context, clazz);

		PendingIntent pIntent = PendingIntent.getActivity(context, 0, intent, 0);

		notification.setLatestEventInfo(context, contentTitle, contentText, pIntent);

		notificationManager.notify(600, notification);
	}

	public void buildNotification1 (Context context, Class clazz, String contentText) {
		buildNotification(context, clazz, contentText, System.currentTimeMillis(), context.getString(R.string.current_clip_content), contentText);
	}
	
}
